package com.zjitc.serviceedu.mapper;

import com.zjitc.serviceedu.entity.EduVideo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

/**
 * <p>
 * 课程视频 Mapper 接口
 * </p>
 *
 * @author 赵诚挚
 * @since 2024-09-20
 */
public interface EduVideoMapper extends BaseMapper<EduVideo> {
    @Delete("DELETE FROM edu_video WHERE course_id = #{courseId}")
    int deleteByCourseId(Long courseId);

    @Insert("INSERT INTO edu_video ( duration) " +
            "VALUES ( #{duration})")
    void insertduration(Float eduVideo);
}
